import React from "react";
import styled, {ThemeProvider,withTheme} from 'styled-components';

// Define what props.theme will look like
const theme = {
  main: "mediumseagreen"
};

class _MyComponent extends React.Component {
  render() {
    console.log('Current theme: ', this.props.theme)
    return (
      <div>
        MyComponent
        <br/>
        {this.props.theme.main}
      </div>
    )
  }
}

const MyComponent = withTheme(_MyComponent);

export default ()=>(
  <div>
    <ThemeProvider theme={theme}>
      <MyComponent/>
    </ThemeProvider>
  </div>
)
